<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<jsp:include page="/resources/admin/view/main/header.jsp"/>

<!-- business code start -->
<style>
.areaText 
{
	height:18px;width:50px
}
li {list-style-type:none;}
</style>
<form id="frm_product" action="/udwin/product/addProduct" method="post" enctype="multipart/form-data" class="definewidth m20">
<table class="table table-bordered table-hover definewidth m10">
    <tr>
        <td width="10%" class="tableleft">产品名称</td>
        <td><input type="text" name="productName"/></td>
    </tr>
    <tr>
        <td class="tableleft">位置</td>
        <td>
        	<select name="locationUuid" id="location_uuid">
			</select>
        </td>
    </tr>
    <tr>
        <td class="tableleft">颜色</td>
        <td>
        	<select name="colorUuid" id="color_uuid">
			</select>
        </td>
    </tr>
    <tr>
        <td class="tableleft">材料</td>
        <td>
        	<select name="stuffUuid" id="stuff_uuid">
			</select>
        </td>
    </tr>
    <tr>
        <td class="tableleft">风格</td>
        <td>
        	<select name="styleUuid" id="style_uuid">
			</select>
        </td>
    </tr>
    <tr>
        <td class="tableleft">型号</td>
        <td>
        	<select name="modelUuid" id="model_uuid">
			</select>
        </td>
    </tr>
    <tr>
        <td class="tableleft">产品类别</td>
        <td>
        	<select name="productTypeUuid" id="productType_uuid">
			</select>
        </td>
    </tr>
    <tr>
        <td class="tableleft">用途</td>
        <td>
        	<select name="useUuid" id="use_uuid">
			</select>
        </td>
    </tr>
    <tr>
        <td class="tableleft">打开方式</td>
        <td>
        	<select name="openUuid" id="open_uuid">
			</select>
        </td>
    </tr>
    <tr>
        <td class="tableleft">定制周期</td>
        <td><input type="text" name="customCycle"/></td>
    </tr>
    <tr>
        <td class="tableleft">热度</td>
        <td><input type="text" name="heat"/></td>
    </tr>
    <tr>
        <td class="tableleft">面积</td>
        <td>
        	长：<input type="text" name="longs" class="areaText"/>
        	宽：<input type="text" name="wide" class="areaText"/>
        	高：<input type="text" name="high" class="areaText"/>
        </td>
    </tr>
    <tr>
        <td class="tableleft">销量</td>
        <td><input type="text" name="salesVolume"/></td>
    </tr>
    <tr>
        <td class="tableleft">价格</td>
        <td><input type="text" name="price"/></td>
    </tr>
    <tr>
        <td class="tableleft">简述</td>
        <td><input type="text" name="description"/></td>
    </tr>
    <tr>
        <td class="tableleft">状态</td>
        <td>
			<select name="status">
        		<option value = '1'>上架</option>
        		<option value = '2'>下架</option>
        	</select>
		</td>
    </tr>
    <tr>
        <td class="tableleft">产品详情</td>
        <td>
        	<ul id="details">
        		<li><input type="file" name="details"/><button type="button" class="btn btn-primary" onClick="addFile(this)">添加</button></li>
        	</ul>
        </td>
    </tr>
    <tr>
        <td class="tableleft">加工工艺</td>
        <td>
        	<ul id="technology">
        		<li><input type="file" name="technology"/><button type="button" class="btn btn-primary" onClick="addFile(this)">添加</button></li>
        	</ul>
        </td>
    </tr>
    <tr>
        <td class="tableleft">售后服务</td>
        <td>
        	<ul id="service">
        		<li><input type="file" name="service"/><button type="button" class="btn btn-primary" onClick="addFile(this)">添加</button></li>
        	</ul>
        </td>
    </tr>
    <tr>
        <td class="tableleft">展示图片</td>
        <td>
        	<ul id="picture">
        		<li><input type="file" name="picture"/><button type="button" class="btn btn-primary" onClick="addFile(this)">添加</button></li>
        	</ul>	
        </td>
    </tr>
    <tr>
        <td class="tableleft"></td>
        <td>
            <input type="submit" class="btn btn-primary" value="保存"/> &nbsp;&nbsp;<button type="button" class="btn btn-success" name="backid" id="backid">返回列表</button>
        </td>
    </tr>
</table>
</form>
<!-- business code end -->

<jsp:include page="/resources/admin/view/main/footer.jsp"/>

<script>
    $(function () {       
		$('#backid').click(function(){
				window.location.href="<%=request.getContextPath()%>/resources/admin/view/udwin/product/listProduct.jsp";
		 });

    });
</script>

<script src="<%=request.getContextPath()%>/resources/admin/js/business/udwin/product/product.js"></script>
